package com.example.aop.controller;

import com.example.aop.config.MyAspect;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/test")
@Slf4j
public class TestController {
    @MyAspect
    @RequestMapping("/t1")
    public String t1(){
        log.info("t1.....");
        return "string";
    }
    @RequestMapping("/t2")
    public Integer t2(){
        log.info("t2...");
        int ret = 10 / 0;
        return ret;
    }
}
